package com.namecard.namecardapi.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;


import java.io.Serializable;


/**
 * <p>
 *
 * </p>
 *
 * @author wzx
 * @since 2023-07-03
 */
@TableName("card_info")
@Data
@AllArgsConstructor
@NoArgsConstructor
@HeadStyle(horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER, shrinkToFit = true)
@HeadFontStyle(fontName = "微软雅黑",fontHeightInPoints = 11,bold = false)
@HeadRowHeight(value = 35)
@ContentFontStyle(fontName = "微软雅黑",fontHeightInPoints = 11)
@ContentRowHeight(value = 30)
@ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER, wrapped = true)
public class CardInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ExcelIgnore
    private Long id;

    /**
     * 卡片id
     */
    @ExcelProperty("cardId")
    private String cardId;

    /**
     * 真实姓名
     */
    @ExcelProperty("name")
    private String name;

    /**
     * 年龄
     */
    @ExcelProperty("age")
    private Integer age;

    /**
     * 职业
     */
    @ExcelProperty("occupation")

    private String occupation;

    /**
     * 电话号码
     */
    @ExcelProperty("phone")
    private String phone;

    /**
     * 地址
     */
    @ExcelProperty("address")
    private String address;

    /**
     * 邮箱
     */
    @ExcelProperty("email")
    private String email;

    /**
     * 公司
     */
    @ExcelProperty("company")
    private String company;

    /**
     * 0:未删除1:逻辑删除2:真正删除
     */
    @ExcelIgnore
    private Integer delFlag;

    /**
     * 用户id
     */
    @ExcelProperty("userId")
    private String userId;

    /**
     * 名片曝光率
     */
    @ExcelIgnore
    private Long exposureValue;

    /**
     * 标签集合
     */
    @TableField(value="tag_list",typeHandler = FastjsonTypeHandler.class)
    @ExcelProperty("tagList")
    private String tagList;

    /**
     * 名片用户的简介
     */
    @ExcelProperty("personalProfile")
    private String personalProfile;

    @ExcelProperty("gender")
    private Integer gender;

    @TableField(exist = false)
    private Integer colour;

    @TableField(exist = false)
    private String userImage;

}
